﻿<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>厦门大孩子教育</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/><!--网页标题显示-->
    <link rel="Shortcut Icon" href="favicon.ico" type="image/x-icon"><!--网页标题显示-->
    <link rel="Bookmark" href="favicon.ico"><!--被收藏后，收藏夹显示-->
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="../superui/content/ui/global/bootstrap/css/bootstrap.min.css"
        th:href="@{/superui/content/ui/global/bootstrap/css/bootstrap.min.css}"/>
    <!-- Font Awesome -->
    <link href="../superui/content/ui/global/font-awesome/css/font-awesome.css" rel="stylesheet"
          th:href="@{/superui/content/ui/global/font-awesome/css/font-awesome.css}"/>
    <!-- Theme style -->
    <link rel="stylesheet" href="../superui/content/adminlte/dist/css/AdminLTE.css"
          th:href="@{/superui/content/adminlte/dist/css/AdminLTE.css}"/>
    <link rel="stylesheet" href="../superui/content/adminlte/dist/css/skins/_all-skins.css"
        th:href="@{/superui/content/adminlte/dist/css/skins/_all-skins.css}"/>
    <link href="../superui/content/min/css/supershopui.common.min.css" rel="stylesheet"
        th:href="@{/superui/content/min/css/supershopui.common.min.css}"/>
    <link href="../css/global.css" rel="stylesheet"
          th:href="@{/css/global.css}"/>
    <style type="text/css">
         html {
            overflow: hidden;
        }
         .main-header{
             background-color: #44a53e;
         }
         .skin-blue .main-header .logo{
            background-color: #44a53e;
        }
         .skin-blue .main-header .navbar{
            background-color: #44a53e;
        }
    </style>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <!--<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>-->
    <!--<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>-->
    <![endif]-->
</head>

<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
    <!-- Logo -->
    <a href="" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini">龟兔</span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg">
            <img src="../img/logo_w.png"  th:src="@{/img/logo_w.png}" width="70%">
        </span>
    </a>
   
    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top" role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">切换导航</span>
        </a>
        <!-- Navbar Right Menu -->
        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <!-- Messages: style can be found in dropdown.less-->
                <li class="dropdown messages-menu hide">
                    <!-- Menu toggle button -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-envelope-o"></i>
                        <span class="label label-success">4</span>
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header">你有4条提醒</li>
                        <li>
                            <!-- inner menu: contains the messages -->
                            <ul class="menu">
                                <li>
                                    <!-- start message -->
                                    <a href="#">
                                        <div class="pull-left">
                                            <!-- User Image -->
                                            <img src="../superui/content/ui/img/photos/girl1.png" th:src="@{/superui/content/ui/img/photos/girl1.png}" class="img-circle" alt="User Image"/>
                                        </div>
                                        <!-- Message title and timestamp -->
                                        <h4>
                                            新用户注册
                                            <small><i class="fa fa-clock-o"></i> 现在</small>
                                        </h4>
                                        <!-- The message -->
                                        <p>新用户注册!</p>
                                    </a>
                                </li>
                                <!-- end message -->
                            </ul>
                            <!-- /.menu -->
                        </li>
                        <li class="footer"><a href="#">查看所有提醒</a></li>
                    </ul>
                </li>
                <!-- /.messages-menu -->
                <!-- Notifications Menu -->
                <li class="dropdown notifications-menu hide">
                    <!-- Menu toggle button -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-bell-o"></i>
                        <span class="label label-warning">10</span>
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header">你有10条消息</li>
                        <li>
                            <!-- Inner Menu: contains the notifications -->
                            <ul class="menu">
                                <li>
                                    <!-- start notification -->
                                    <a href="#">
                                        <i class="fa fa-users text-aqua"></i> 新用户注册!
                                    </a>
                                </li>
                                <!-- end notification -->
                            </ul>
                        </li>
                        <li class="footer"><a href="#">查看所有</a></li>
                    </ul>
                </li>
                <!-- Tasks Menu -->
                <!-- User Account Menu -->
                <li class="dropdown user user-menu" style="padding: 0px;">
                    <!-- Menu Toggle Button -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <!-- The user image in the navbar-->
                        <img src="../superui/content/ui/img/photos/girl1.png" th:src="@{/superui/content/ui/img/photos/girl1.png}" class="user-image" alt="User Image"/>
                        <!-- hidden-xs hides the username on small devices so only the image appears. -->
                        <span class="hidden-xs" th:text="${session.user.username}"></span>
                    </a>
                    <ul class="dropdown-menu" style="padding: 0px;">
                        <!-- The user image in the menu -->
                        <!-- Menu Body -->
                        <li class="user-body" style="padding-left: 0px;padding-right: 0px;padding-top: 5px;padding-bottom: 0px;text-align: center;">
                            <a href="#"><span th:text="${session.user.truename}"></span></a>
                            <!-- /.row -->
                        </li>
                        <li class="user-body" style="padding-left: 0px;padding-right: 0px;padding-top: 5px;padding-bottom: 0px;text-align: center;">
                            <a href="#" onclick="settingUser();">安全设置</a>
                            <!-- /.row -->
                        </li>
                        <!-- Menu Footer-->
                        <li class="user-footer" style="padding: 0px;">
                            <a href="/logOut" th:href="@{/logOut}"  class="btn btn-default btn-flat">退出</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>


</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar Menu -->
        <ul class="sidebar-menu">
           
        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"  id="content-wrapper">
    <div class="content-tabs">
        <button class="roll-nav roll-left tabLeft" onclick="scrollTabLeft()">
            <i class="fa fa-backward"></i>
        </button>
        <nav class="page-tabs menuTabs tab-ui-menu" id="tab-menu">
            <div class="page-tabs-content" style="margin-left: 0px;">

            </div>
        </nav>
        <button class="roll-nav roll-right tabRight" onclick="scrollTabRight()">
            <i class="fa fa-forward" style="margin-left: 3px;"></i>
        </button>
        <div class="btn-group roll-nav roll-right">
            <button class="dropdown tabClose" data-toggle="dropdown">
                页签操作<i class="fa fa-caret-down" style="padding-left: 3px;"></i>
            </button>
            <ul class="dropdown-menu dropdown-menu-right" style="min-width: 128px;">
                <li><a class="tabReload" href="javascript:refreshTab();">刷新当前</a></li>
                <li><a class="tabCloseCurrent" href="javascript:closeCurrentTab();">关闭当前</a></li>
                <li><a class="tabCloseAll" href="javascript:closeOtherTabs(true);">全部关闭</a></li>
                <li><a class="tabCloseOther" href="javascript:closeOtherTabs();">除此之外全部关闭</a></li>
            </ul>
        </div>
        <button class="roll-nav roll-right fullscreen" ><i class="fa fa-arrows-alt"></i></button>
    </div>
    <div class="content-iframe " style="background-color: #ffffff; ">
        <div class="tab-content " id="tab-content">

        </div>
    </div>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Main Footer -->
<footer class="main-footer">
    <!-- To the right -->
    <div class="pull-right hidden-xs">
       <!--SuperShop项目组-->
    </div>
    <!-- Default to the left -->
    版权所有 &copy;dahaiz 2015-2018&nbsp;&nbsp;&nbsp;&nbsp;   粤ICP备16024545号-1
</footer>

</div>

<div class="modal fade" id="settingModal">
    <div class="modal-dialog" style="width: 600px">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">我的设置</h4>
            </div>
            <form id="settingUser" class="form-horizontal">
                <div class="modal-body">
                    <div class="box-body">
                        <input type="hidden" id="id" name="id" value="">
                        <div class="col-md-4 txt-aln-c" style="display: none">

                            <img style="width:150px;" src="../superui/content/ui/img/photos/girl1.png" th:src="@{/superui/content/ui/img/photos/girl1.png}" class="user-image">
                            <button class="btn btn-primary" style="margin-top: 10px;">上传头像</button>
                        </div>
                        <div class="col-md-12">

                            <div class="form-group">
                                <label for="truename" class="col-sm-3 control-label necessary">姓名</label>
                                <div class="col-sm-9">
                                    <p class="form-control-static" style="padding-left: 10px;" id="truename" name="truename" th:text="${session.user.username}" th:value="${session.user.username}"></p>
                                </div>
                                <!--<div class="col-sm-9">-->
                                    <!--<input type="text" class="form-control" id="truename" name="truename" th:value="${session.user.username}" placeholder="请输入姓名" readonly="true" />-->
                                <!--</div>-->
                            </div>
                            <div class="form-group">
                                <label for="phone" class="col-sm-3 control-label necessary">手机号码</label>
                                <div class="col-sm-9 necessary">
                                    <input type="text" class="form-control" id="phone" name="phone" th:value="${session.user.phone}" placeholder="请输入手机号码" readonly="true" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="password" class="col-sm-3 control-label necessary">修改密码</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="password" name="password" maxlength="20" placeholder="请输入密码" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="password" class="col-sm-3 control-label necessary">确认密码</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="confirmPassword" name="confirmPassword" maxlength="20" placeholder="请输入密码" />
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" id="btn-save">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>
    <!-- ./wrapper -->
    <!-- REQUIRED JS SCRIPTS -->
    <!-- jQuery 2.2.3 -->
    <script src="../superui/content/ui/global/jQuery/jquery.min.js"
        th:src="@{/superui/content/ui/global/jQuery/jquery.min.js}"></script>

    <!-- Bootstrap 3.3.6 -->
    <script src="../superui/content/ui/global/bootstrap/js/bootstrap.min.js"
        th:src="@{/superui/content/ui/global/bootstrap/js/bootstrap.min.js}"></script>


    <script src="../superui/content/min/js/supershopui.common.js"
        th:src="@{/superui/content/min/js/supershopui.common.js}"></script>


    <script src="../js/assets/common/bootstrap-table-object.js"
        th:src="@{/js/assets/common/bootstrap-table-object.js}"></script>

    <!-- 请求脚本-->
    <script src="./../../js/assets/common/ajax-util.js"
        th:src="@{/js/assets/common/ajax-util.js}"></script>
    <!-- 请求脚本-->
    <script src="./../../js/assets/common/common.js"
        th:src="@{/js/assets/common/common.js}"></script>
    <script src="./../../js/assets/common/Feng.js"
        th:src="@{/js/assets/common/Feng.js}"></script>

<script th:inline="javascript">

    $(function() {
        var baseUrl = [[${#httpServletRequest.getContextPath()}]];
        if (baseUrl === '/') baseUrl = '';

        var role = [[${#httpServletRequest.getSession().getAttribute("userRole")}]];

        //保存项目名
        localStorage.setItem("baseUrl",baseUrl);

        console.log(baseUrl);
//        addTabs(({ id: '10008', title: '首页', close: false, url: baseUrl+ '/sysUser/page' }));
        App.fixIframeCotent();
        var menus = [];
        var SYSTEM_ADMIN_MENUS = [
            {
                id: "10010",
                isOpen: true,
                text: "系统管理",
                icon: "fa fa-tv",
                children: [
                    {id: "10011", text: "用户管理", url: baseUrl + "/sysUser/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10012", text: "角色管理", url: baseUrl + "/role/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10013", text: "校区管理", url: baseUrl + "/school/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10020",
                isOpen: false,
                text: "课程管理",
                icon: "fa fa-book",
                children: [
                    {id: "10021", text: "课程分类", url: baseUrl + "/course/type/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10022", text: "课程管理", url: baseUrl + "/course/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10030",
                isOpen: false,
                text: "订单管理",
                icon: "fa fa-book",
                children: [
                    {id: "10031", text: "订单管理", url: baseUrl + "/order/orderlist/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10032", text: "优惠券管理", url: baseUrl + "/order/couponcard/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10033", text: "活动管理", url: baseUrl + "/activity/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10034", text: "退款管理", url: baseUrl + "/order/refunds/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10040",
                isOpen: false,
                text: "教师管理",
                icon: "fa fa-book",
                children: [
                    {id: "10041", text: "教师列表", url: baseUrl + "/teacher/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10050",
                isOpen: false,
                text: "Banner管理",
                icon: "fa fa-book",
                children: [
                    {id: "10051", text: "Banner列表", url: baseUrl + "/banner/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10060",
                isOpen: false,
                text: "学员管理",
                icon: "fa fa-book",
                children: [
                    {id: "10061", text: "学员列表", url: baseUrl + "/vip/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10070",
                isOpen: false,
                text: "发票管理",
                icon: "fa fa-book",
                children: [
                    {id: "10071", text: "发票列表", url: baseUrl + "/invoice/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10080",
                isOpen: false,
                text: "报表管理",
                icon: "fa fa-book",
                children: [
                    {id: "10081", text: "报表管理", url: baseUrl + "/order/stat/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            }
        ];
        var TEACHER_MAIN_MENUS = [];
        var ASSISTANT_DIRECTOR_MENUS = [
            {
                id: "10020",
                isOpen: false,
                text: "课程管理",
                icon: "fa fa-book",
                children: [
                    {id: "10021", text: "课程分类", url: baseUrl + "/course/type/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10022", text: "课程管理", url: baseUrl + "/course/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10030",
                isOpen: false,
                text: "订单管理",
                icon: "fa fa-book",
                children: [
                    {id: "10031", text: "订单管理", url: baseUrl + "/order/orderlist/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10080",
                isOpen: false,
                text: "报表管理",
                icon: "fa fa-book",
                children: [
                    {id: "10081", text: "报表管理", url: baseUrl + "/order/stat/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            }
        ];
        var SCHOOL_DIRECTOR_MENUS = [
            {
                id: "10020",
                isOpen: false,
                text: "课程管理",
                icon: "fa fa-book",
                children: [
                    {id: "10021", text: "课程分类", url: baseUrl + "/course/type/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10022", text: "课程管理", url: baseUrl + "/course/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10030",
                isOpen: false,
                text: "订单管理",
                icon: "fa fa-book",
                children: [
                    {id: "10031", text: "订单管理", url: baseUrl + "/order/orderlist/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10034", text: "退款管理", url: baseUrl + "/order/refunds/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10060",
                isOpen: false,
                text: "学员管理",
                icon: "fa fa-book",
                children: [
                    {id: "10061", text: "学员列表", url: baseUrl + "/vip/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10080",
                isOpen: false,
                text: "报表管理",
                icon: "fa fa-book",
                children: [
                    {id: "10081", text: "报表管理", url: baseUrl + "/order/stat/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            }
        ];
        var FINANCE_MENUS = [
            {
                id: "10020",
                isOpen: false,
                text: "课程管理",
                icon: "fa fa-book",
                children: [
                    {id: "10021", text: "课程分类", url: baseUrl + "/course/type/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10022", text: "课程管理", url: baseUrl + "/course/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10030",
                isOpen: false,
                text: "订单管理",
                icon: "fa fa-book",
                children: [
                    {id: "10031", text: "订单管理", url: baseUrl + "/order/orderlist/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10032", text: "优惠券管理", url: baseUrl + "/order/couponcard/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10033", text: "活动管理", url: baseUrl + "/activity/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10034", text: "退款管理", url: baseUrl + "/order/refunds/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10060",
                isOpen: false,
                text: "学员管理",
                icon: "fa fa-book",
                children: [
                    {id: "10061", text: "学员列表", url: baseUrl + "/vip/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10070",
                isOpen: false,
                text: "发票管理",
                icon: "fa fa-book",
                children: [
                    {id: "10071", text: "发票列表", url: baseUrl + "/invoice/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10080",
                isOpen: false,
                text: "报表管理",
                icon: "fa fa-book",
                children: [
                    {id: "10081", text: "报表管理", url: baseUrl + "/order/stat/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            }
        ];
        var PARTNER_MENUS = [
            {
                id: "10060",
                isOpen: false,
                text: "学员管理",
                icon: "fa fa-book",
                children: [
                    {id: "10061", text: "学员列表", url: baseUrl + "/vip/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10030",
                isOpen: false,
                text: "订单管理",
                icon: "fa fa-book",
                children: [
                    {id: "10031", text: "订单管理", url: baseUrl + "/order/orderlist/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10032", text: "优惠券管理", url: baseUrl + "/order/couponcard/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10033", text: "活动管理", url: baseUrl + "/activity/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            },
            {
                id: "10080",
                isOpen: false,
                text: "报表管理",
                icon: "fa fa-book",
                children: [
                    {id: "10081", text: "报表管理", url: baseUrl + "/order/stat/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            }
        ];
        var TEACHER_HELP_MENUS = [
            {
                id: "10020",
                isOpen: false,
                text: "课程管理",
                icon: "fa fa-book",
                children: [
                    {id: "10021", text: "课程分类", url: baseUrl + "/course/type/page", targetType: "iframe-tab", icon: "fa fa-circle-o"},
                    {id: "10022", text: "课程管理", url: baseUrl + "/course/list/page", targetType: "iframe-tab", icon: "fa fa-circle-o"}
                ]
            }
        ];

        switch (role.roleCode) {
            case "SYSTEM_ADMIN": {
                menus = SYSTEM_ADMIN_MENUS;
            }
                break;
            case "TEACHER_MAIN": {
                menus = TEACHER_MAIN_MENUS;
            }
                break;
            case "ASSISTANT_DIRECTOR": {
                menus = ASSISTANT_DIRECTOR_MENUS;
            }
                break;
            case "SCHOOL_DIRECTOR": {
                menus = SCHOOL_DIRECTOR_MENUS;
            }
                break;
            case "FINANCE": {
                menus = FINANCE_MENUS;
            }
                break;
            case "PARTNER": {
                menus = PARTNER_MENUS;
            }
                break;
            case "TEACHER_HELP": {
                menus = TEACHER_HELP_MENUS;
            }
                break;
            default:
        }
        $('.sidebar-menu').sidebarMenu({data: menus});

    });
</script>
<script>

    function settingUser() {
        $("#settingModal").modal({
            keyboard: true,
            backdrop: 'static'
        }).on('show.bs.modal',centerModals);
    }

    function centerModals(){
        $('.modal').each(function(i){
            var $clone = $(this).clone().css('display', 'block').appendTo('body');
            var top = Math.round(($clone.height() - $clone.find('.modal-content').height()) / 2);
            top = top > 50 ? top : 0;
            $clone.remove();
            $(this).find('.modal-content').css("margin-top", top-50);
        });
    }
    // 在窗口大小改变的时候调用垂直居中函数
    $(window).on('resize', centerModals);

//    $(function () {
//        $("#userModal").on("hidden.bs.modal",function () {
//            console.log("关闭");
//        });
//    });
</script>

<script>
    //修改密码
    $("#btn-save").on("click",function () {
        var newPassword = $("#password").val(),
            confirmPassword = $("#confirmPassword").val(),
            phone = $("#phone").val();

        if (newPassword == null ||newPassword == "" || newPassword == undefined){
            Feng.error("密码不能为空");
            return;
        }

        if (newPassword == null ||newPassword == "" || newPassword == undefined){
            Feng.error("密码不能为空");
            return;
        }

        var options = {
            newPassword:newPassword,
            confirmPassword:confirmPassword,
            phone:phone
        };

        if(confirmPassword != newPassword){
            Feng.error("两次输入的密码不相同！");
        }else{
            var ajax = new $ax(Feng.ctxPath+"/sysUser/changePassword", function(data){
                Feng.log("修改用户密码");
                if (data.success){
                    Feng.success("密码修改成功!");
                    $("#password").val("");
                    $("#confirmPassword").val("");

                    $("#settingModal").modal("hide");
                }else{
                    Feng.error("密码修改失败!");
                }
            },function(data){
                Feng.error("密码修改失败!");
            });
            ajax.data= options;
            ajax.start();
        }
    });
</script>
</body>
</html>
